package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Treatment generated by hbm2java
 */
@Entity
@Table(name = "Treatment", schema = "dbo", catalog = "imgbms")
public class Treatment implements java.io.Serializable {

	private int id;
	private ActivityType activityType;
	private Activity activity;
	private Material material;
	private Operator operator;
	private Boolean hasTrtTag;
	private Date treatmentDate;
	private int treatmentTypeId;
	private Integer generation;
	private Integer numberOfCulture;
	private String note;
	private int quantity;

	public Treatment() {
	}

	public Treatment(int id, Activity activity, Material material,
			Operator operator, int treatmentTypeId, int quantity) {
		this.id = id;
		this.activity = activity;
		this.material = material;
		this.operator = operator;
		this.treatmentTypeId = treatmentTypeId;
		this.quantity = quantity;
	}

	public Treatment(int id, ActivityType activityType, Activity activity,
			Material material, Operator operator, Boolean hasTrtTag,
			Date treatmentDate, int treatmentTypeId, Integer generation,
			Integer numberOfCulture, String note, int quantity) {
		this.id = id;
		this.activityType = activityType;
		this.activity = activity;
		this.material = material;
		this.operator = operator;
		this.hasTrtTag = hasTrtTag;
		this.treatmentDate = treatmentDate;
		this.treatmentTypeId = treatmentTypeId;
		this.generation = generation;
		this.numberOfCulture = numberOfCulture;
		this.note = note;
		this.quantity = quantity;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "activityTypeId")
	public ActivityType getActivityType() {
		return this.activityType;
	}

	public void setActivityType(ActivityType activityType) {
		this.activityType = activityType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "activityId", nullable = false)
	public Activity getActivity() {
		return this.activity;
	}

	public void setActivity(Activity activity) {
		this.activity = activity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "materialId", nullable = false)
	public Material getMaterial() {
		return this.material;
	}

	public void setMaterial(Material material) {
		this.material = material;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "operatorId", nullable = false)
	public Operator getOperator() {
		return this.operator;
	}

	public void setOperator(Operator operator) {
		this.operator = operator;
	}

	@Column(name = "hasTrtTag")
	public Boolean getHasTrtTag() {
		return this.hasTrtTag;
	}

	public void setHasTrtTag(Boolean hasTrtTag) {
		this.hasTrtTag = hasTrtTag;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "treatmentDate", length = 23)
	public Date getTreatmentDate() {
		return this.treatmentDate;
	}

	public void setTreatmentDate(Date treatmentDate) {
		this.treatmentDate = treatmentDate;
	}

	@Column(name = "treatmentTypeId", nullable = false)
	public int getTreatmentTypeId() {
		return this.treatmentTypeId;
	}

	public void setTreatmentTypeId(int treatmentTypeId) {
		this.treatmentTypeId = treatmentTypeId;
	}

	@Column(name = "generation")
	public Integer getGeneration() {
		return this.generation;
	}

	public void setGeneration(Integer generation) {
		this.generation = generation;
	}

	@Column(name = "numberOfCulture")
	public Integer getNumberOfCulture() {
		return this.numberOfCulture;
	}

	public void setNumberOfCulture(Integer numberOfCulture) {
		this.numberOfCulture = numberOfCulture;
	}

	@Column(name = "note")
	public String getNote() {
		return this.note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	@Column(name = "quantity", nullable = false)
	public int getQuantity() {
		return this.quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

}
